package com.atguigu.jxc.dao;

import com.atguigu.jxc.entity.ReturnList;
import com.atguigu.jxc.vo.PurchaseListAndReturnListVo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public interface ReturnListDao {
    //保存退货单
    void saveReturnList(ReturnList returnList);

    //退货单列表展示（可条件查询：单据号模糊、供应商、是否付款和日期区间）
    List<ReturnList> listSelect(@Param("returnNumber") String returnNumber, @Param("supplierId") Integer supplierId,
                                @Param("state") Integer state,@Param("sTime") String sTime,@Param("eTime") String eTime);

    //删除退货单
    void deleteReturnList(@Param("returnListId")Integer returnListId);

    //根据id查询退款状态
    ReturnList selectById(@Param("returnListId") Integer returnListId);

    //修改供应商退货单退款状态
    void updateState(ReturnList returnList);

    //退货统计（可根据 商品类别、商品编码或名称 条件查询）
    List<PurchaseListAndReturnListVo> count(@Param("sTime") String sTime, @Param("eTime") String eTime, @Param("goodsTypeId") Integer goodsTypeId, @Param("codeOrName") String codeOrName);
}
